home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / pwrbat23.zip / QUOTES.PWR < prev    next >
Text File  |  1996-05-09  |  984b  |  24 lines

  1. ; This program shows a technique for supplying a quote character in a
  2. ;  parameter string passed to another program. In this example we
  3. ;  are passing parameters to the DOS utility FIND which requires that
  4. ;  the string to be found be enclosed in quotes
  5.  
  6.   Variable  Quote,2,#034        ;define the quote character
  7.   Concat    Quote,Quote,Quote   ;this just keeps the .MAP file happy
  8.   Variable  QChar,1,''          ;new single quote variable
  9.   MidString QChar,Quote,1,1     ;build the new variable
  10.   Variable  FindStr,64          ;string to find
  11.   Variable  FileName,64         ;in what file
  12.  
  13.   Clear
  14.   Write     'Enter Find String '
  15.   ReadStr   FindStr             ;enter string to find
  16.   WriteLine ''
  17.   Write     'Enter File Name '
  18.   ReadStr   FileName            ;enter file name to look
  19.   WriteLine ''
  20.   Concat    FindStr,QChar,FindStr,QChar
  21.   FIND      FindStr,FileName    ;execute FIND command
  22.   Write     'Press any key to continue'
  23.   ReadKey   FindStr
  24.